package com.cjy.common.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

/**
 * 全局异常拦截处理器 2013-12-23 上午9:34:41
 * 
 * @author hubery.niejinzhen
 */
public class ExceptionHandlerIntercepter extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		// 捕获异常，打印异常
		try {
			return invocation.invoke();
		} catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

}
